package org.example.controller;


import org.example.ResultMap;
import org.example.User;
import org.example.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("Feign")
public class FeignController {
    @Autowired
    FeignService feignService;
    @RequestMapping("/getUser/{name}/{age}")
    public ResultMap<User> getUserMap(@PathVariable("name") String name,
                                      @PathVariable("age") int age)
    {
        return feignService.getUserMap(name,age);
    }


}
